package com.call.project.utils;

/**
 Created by IntelliJ IDEA.
 User: wk
 Date: 2017-03-20 下午9:57
 */
public class ResponseEntity<T> {
    private T      data;
    private int    code;
    private String msg;

    public ResponseEntity() {
    }

    public ResponseEntity(T data, int code, String msg) {
        this.data = data;
        this.code = code;
        this.msg = msg;
    }

    public static ResponseEntity success(Object obj) {
        return new ResponseEntity(obj, 200, "");
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
